Skip to content

Subject class

Defined in

Namespace: System.Reactive.Subjects Assembly: System.Reactive.dll Full name: System.Reactive.Subjects.Subject<T> Modifiers: public sealed

Summary

        Represents an object that is both an observable sequence as well as an observer.
        Each notification is broadcasted to all subscribed observers.
        

Applies to

netstandard2.0

Class hierarchy
classDiagram
class Subject~T~
class SubjectBase~T~
SubjectBase~T~ <|-- Subject~T~

Inherits from: SubjectBase

Constructors

NameSummary
.ctorCreates a subject.

Properties

NameSummary
HasObserversIndicates whether the subject has observers subscribed to it.
IsDisposedIndicates whether the subject has been disposed.

Methods

NameSummary
OnCompletedNotifies all subscribed observers about the end of the sequence.
OnErrorNotifies all subscribed observers about the specified exception.
OnNextNotifies all subscribed observers about the arrival of the specified element in the sequence.
SubscribeSubscribes an observer to the subject.
DisposeReleases all resources used by the current instance of the [Subject](# class and unsubscribes all observers.
Inherited members